# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-imucal
_pkgorig=imucal
pkgver=2.4.0
pkgrel=2
pkgdesc="A Python library to calibrate 6 DOF IMUs"
url="https://github.com/mad-lab-fau/imucal"
arch="noarch !armhf !armv7 !riscv64 !x86" # py3-matplotlib #assertion errors
license="MIT"
depends="
	python3
	py3-h5py
	py3-matplotlib
	py3-numpy
	py3-pandas
	py3-packaging
	py3-typing-extensions
	"
checkdepends="py3-pytest-xdist"
makedepends="py3-poetry-core py3-gpep517"
subpackages="$pkgname-pyc"
source="https://github.com/mad-lab-fau/imucal/archive/v$pkgver/$_pkgorig-$pkgver.tar.gz"
builddir="$srcdir/imucal-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -n auto
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/imucal-$pkgver-py3-none-any.whl
}

sha512sums="
53436af0257d213bf2692fbed590107193f360df368dedff66152893df68ed02de5a20da0d0817e87a988ec24d21e2bea98a6d0d775f7e54b464d256c43e2496  imucal-2.4.0.tar.gz
"
